package com.xbongbong.pro.businesstage.pojo;

import com.xbongbong.saas.domain.entity.StageWorkEntity;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Size;

/**
 * 阶段工作，设置
 * @author haibin.zhang
 * @version v1.0
 * @date 2019/2/12 21:55
 * @since v1.0
 */
@Getter
@Setter
public class StageWorkPojo {
    /**
     * 阶段工作id
     */
    private Long id;
    /**
     * 工作名称
     */
    @Size(min = 1,max = 30, message = "工作名称不能为空或大于30")

    private String name;
    /**
     * 是否必做
     */
    private Integer required;

    public StageWorkPojo() {
    }

    public StageWorkPojo(StageWorkEntity entity) {
        this.id = entity.getId();
        this.name = entity.getName();
        this.required = entity.getRequired();
    }
}
